﻿using System.Configuration;
using System;

namespace Com.Pernix.Common.Log.Configs
{
    public class LogConfiguration : ConfigurationElement
    {
        [ConfigurationProperty("Name", IsKey = true, IsRequired = true)]
        public string Name
        {
            get { return (string)this["Name"]; }
        }

        [ConfigurationProperty("Level", IsKey = false, IsRequired = true)]
        public String Level
        {
            get
            {
                return (string)this["Level"];
            }
        }
        [ConfigurationProperty("FilePath", IsKey = false, IsRequired = true)]
        public string FilePath
        {
            get { return (string)this["FilePath"]; }
        }
        
        [ConfigurationProperty("FileSize", IsKey = false, IsRequired = false, DefaultValue = 0)]
        public int FileSize
        {
            get { return (int)this["FileSize"]; }
        }
        [ConfigurationProperty("Console", IsKey = false, IsRequired = false, DefaultValue = false)]
        public bool Console
        {
            get { return (bool)this["Console"]; }
        }
    }
}
